package sdp.group14.management.staff;

import sdp.group14.R;
import sdp.group14.adapter.TenantEventsListAdapter;
import sdp.group14.appdata.Request;
import sdp.group14.management.HousingManagerApplication;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.CheckBox;
import android.widget.ImageButton;
import android.widget.TextView;

public class StaffViewRequestActivity extends Activity{
	private TextView requestDate, category, status, description, cause, comment;
	private CheckBox allowEnter;
	private TenantEventsListAdapter adapter;
	
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.staff_request_info);
		
		setUpViews();
	}
	/**
	 * register with the views in the xml file
	 */

	protected void setUpViews() {
		Request request = (Request)this.getIntent().getSerializableExtra("request");
		requestDate = (TextView)findViewById(R.id.stf_text_reqdate_data);
		requestDate.setText(request.getreqDate());
		category = (TextView)findViewById(R.id.stf_text_reqitem_data);
		category.setText(request.getreqCategory());
		status = (TextView)findViewById(R.id.stf_text_reqstatus_data);
		status.setText(request.getreqStatus());
		description = (TextView)findViewById(R.id.stf_text_reqdescrip_data);
		description.setText(request.getreqDescription());
		cause = (TextView)findViewById(R.id.stf_text_reqcause_data);
		cause.setText(request.getreqCause());
		comment = (TextView)findViewById(R.id.stf_text_reqcomment_data);
		comment.setText(request.getreqComment());
		allowEnter = (CheckBox)findViewById(R.id.stf_checkbx_allow_enter);
		allowEnter.setChecked(request.isReqAllowEnter() == 1);
		Log.e("StaffViewRequestActivity", "set up views");
	}
	
}
